/**
 * 回到顶部混入
 * @autumn {{methods: {}}}
 */
export const backTopMixin = {
  data(){
    return {
      showBackTop: false //判断是否显示或者隐藏
    }
  },
  methods: {
    backTop(x,y,time=500){
      this.$refs.betScroll.scrollTo(x,y,time);
    }
  }
};

/**
 * 是否选中
 * @autumn {{}}
 */
export const isSelectedMixin = {
  computed: {
    /**
     * 是否选中
     */
    isSelected(){
      let cartList = this.$store.state.cartList;

      let check = cartList.find((item) => {
        return !item.checked;
      });
      return check;
    }
  },
};